<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>nodeName,nodeValue</title>
</head>
<body>
	<!--nodeName, nodeValue实验-->
	<div id="container">这是一个元素节点</div>
	<script>
		var divNode = document.getElementById("container");
		console.log(divNode.nodeName + "/" + divNode.nodeValue);
		// DIV/null

		var attrNode = divNode.attributes[0];
		console.log(attrNode.nodeName + "/" + attrNode.nodeValue);
		// id/container

		var textNode = divNode.childNodes[0];
		console.log(textNode.nodeName + "/" + textNode.nodeValue);
		// #text/这是一个元素节点

		var commentNode = document.body.childNodes[1];
		console.log(commentNode.nodeName + "/" + commentNode.nodeValue);
		// #comment/nodeName, nodeValue实验

		console.log(document.doctype.nodeName + "/" + document.doctype.nodeValue);
		// html/null

		var frag = document.createDocumentFragment();
		console.log(frag.nodeName + "/" + frag.nodeValue);
		// #document-fragment/null

	</script>
</body>
</html>